﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Logging;

namespace Common
{
    public class FCLogger
    {
        public static void WriteInfo(string pMessage)
        {
            Logger.Write(pMessage, "Info");
        }

        public static void WriteError(Exception ex)
        {
            Dictionary<string, object> dic = new Dictionary<string, object>();
            dic.Add("Ex Message", ex.Message);
            dic.Add("Inner Message", ex.InnerException.Message);
            dic.Add("Stack Trace", ex.StackTrace);
            dic.Add("Source", ex.Source);

            Logger.Write("Exception", "Error", dic);
        }
    }
}
